using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Facebook;
using FBConnectAuth;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        mv1.ActiveViewIndex = 0;
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        FBConnectAuthentication auth = new FBConnectAuthentication(	"235bf74613a09c540fe095ed7c337e3d", "38e983f3a56bc7e57773a74570cb7717");
        if (auth.Validate() != ValidationState.Valid)
        {
            // The request does not contain the details of a valid Facebook connect session - you'll probably want to throw an error here.
            lblStatus.Text = "Ne ste Logirani";
        }
        else
        {
            FBConnectSession fbSession = auth.GetSession();
            string userId = fbSession.UserID;
            string sessionKey = fbSession.SessionKey;
            // These values can now be used to communicate with Facebook on behalf of your user - perhaps using the Facebook Developer Toolkit
            // The expiry time and session secret is also available.
            lblStatus.Text = "you are logged in";
        }



        //lbl.Text = "Username: " + txtUsername.Text + ", Password: " + txtPassword.Text;
        //mv1.ActiveViewIndex = 1;
    }
}
